package com.ibs.hadoop.hbase.service.complaint.impl;

import java.util.List;

import com.ibs.hadoop.hbase.bean.QueryBean;
import com.ibs.hadoop.hbase.bean.TauBean;
import com.ibs.hadoop.hbase.bean.UseComplaintBaseClass;
import com.ibs.hadoop.hbase.dao.impl.TauDaoImpl;
import com.ibs.hadoop.hbase.service.complaint.UserComplaintDataQuery;

/**
 * 用户投诉查询
* 源文件名：UserComplaintAttachQuery.java
* 文件版本：1.0.0
* 创建作者：Think
* 创建日期：2016年10月31日
* 修改作者：Think
* 修改日期：2016年10月31日
* 文件描述：TODO
* 版权所有：Copyright 2016 zjhz, Inc. All Rights Reserved.
*/
public class UserComplaintTauQuery implements UserComplaintDataQuery {

    /**
     * 获得实例对象
    * @字段说明 INSTANCE
    */
    private static final UserComplaintTauQuery INSTANCE = new UserComplaintTauQuery();

    public static UserComplaintDataQuery getInstance() {
        return INSTANCE;
    }

    @Override
    public List<UseComplaintBaseClass> query(QueryBean query) {
        return TauDaoImpl.getInstance().query(query);
    }

    @Override
    public String parseLine(UseComplaintBaseClass userComplaint) {

        TauBean param = (TauBean) userComplaint;

        StringBuilder result = new StringBuilder();
        result.append("Frame").append(":").append(param.getFrame()).append(",");
        result.append("Ttime").append(":").append(param.getTtime()).append(",");
        result.append("LastFrame").append(":").append(param.getLastFrame()).append(",");
        result.append("EnbId").append(":").append(param.getEnbId()).append(",");
        result.append("Ci").append(":").append(param.getCi()).append(",");
        result.append("Imsi").append(":").append(param.getImsi()).append(",");
        result.append("Imei").append(":").append(param.getImei()).append(",");
        result.append("MTmsi").append(":").append(param.getMTmsi()).append(",");
        result.append("Mmecode").append(":").append(param.getMmecode()).append(",");
        result.append("NewMmecode").append(":").append(param.getNewMmecode()).append(",");
        result.append("NewMTmsi").append(":").append(param.getNewMTmsi()).append(",");
        result.append("Success").append(":").append(param.getSuccess()).append(",");
        result.append("FailureCause").append(":").append(param.getFailureCause()).append(",");
        result.append("ResponseTime").append(":").append(param.getResponseTime()).append(",");
        result.append("FailureMsg").append(":").append(param.getFailureMsg()).append(",");
        result.append("RecordFileIndex").append(":").append(param.getRecordFileIndex()).append(",");
        result.append("LastFileindex").append(":").append(param.getLastFileindex()).append(",");
        result.append("EnbIp").append(":").append(param.getEnbIp()).append(",");
        result.append("MmeIp").append(":").append(param.getMmeIp()).append(",");
        result.append("TauType").append(":").append(param.getTauType()).append(",");
        result.append("Enb").append(":").append(param.getEnb()).append(",");
        result.append("Mme").append(":").append(param.getMme()).append(",");
        result.append("AuthreqDelay").append(":").append(param.getAuthreqDelay()).append(",");
        result.append("AuthresDelay").append(":").append(param.getAuthresDelay()).append(",");
        result.append("TauCmp").append(":").append(param.getTauCmp()).append(",");
        result.append("DelayCn").append(":").append(param.getDelayCn()).append(",");
        result.append("DelayRadio").append(":").append(param.getDelayRadio()).append(",");
        result.append("Lasttime").append(":").append(param.getLasttime()).append(",");
        result.append("Tac").append(":").append(param.getTac()).append(",");
        result.append("OldTac").append(":").append(param.getOldTac()).append(",");
        result.append("Lac").append(":").append(param.getLac()).append(",");
        result.append("OldLac").append(":").append(param.getOldLac()).append(",");
        result.append("EstablishCause").append(":").append(param.getEstablishCause()).append(",");
        result.append("MmegroupId").append(":").append(param.getMmegroupId()).append(",");
        result.append("EnbUeId").append(":").append(param.getEnbUeId()).append(",");
        result.append("PsStatus").append(":").append(param.getPsStatus()).append(",");
        result.append("TmsiCs").append(":").append(param.getTmsiCs()).append(",");
        result.append("IbsId").append(":").append(param.getIbsId()).append(",");
        result.append("GutiType").append(":").append(param.getGutiType()).append(",");
        result.append("UlTeid").append(":").append(param.getUlTeid()).append(",");
        result.append("SGwIpS1").append(":").append(param.getSGwIpS1()).append(",");
        result.append("BetweenMme").append(":").append(param.getBetweenMme()).append(",");
        result.append("ZoneId").append(":").append(param.getZoneId()).append(",");
        result.append("OriginMcc").append(":").append(param.getOriginMcc()).append(",");
        result.append("RatType").append(":").append(param.getRatType()).append(",");
        return result.toString();
    }

}
